<?php

/**
* 
*/
class Form
{
  protected $_allowedMethods = array('post','get');
  protected $_action  = '';
  public function setAction($action){
    $this->_action = $action;
    return $this;
  }
  public function getAction(){
    return $this->_action;
  }
  
  protected $_method  = 'post';
  public function getMethod(){
    return $this->_method;
  }
  public function setMethod($method){
    if(!in_array(strtolower($method),$this->_allowedMethods))
      throw new Exception('Argument exception');
    
    $this->_method = $method;
    return $this;
  }
  
  protected $_widgets = array();  

  
  public function Form(){
    $this->_configure();
  }
  
  protected function _configure(){
    
  }
  
  public function addWidget(){
    
  }
  
  public function bind($params){
    
  }
  
  public function __get($name){
    return isset($this->_widgets[$name]) ? $this->_widgets[$name] : null;
  }
  
}


?>